package com.carsite.model;


import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 *  模块菜单表
 * @struts.form include-all="false" extends="BaseForm"
 * @hibernate.class table="WT_ModuleMenu"
 */
public class ModuleMenu extends BaseObject implements Serializable {
	
	private Long         menuId;               //Id
   
	private String       menuName;             //名称
	
	private String       url;                  //url
    
    private String       target;               //目标frame
	
	private String       title;                //标题
	private Long deep;							//目录深度
	private ModuleMenu   parent;               //父机构，模块的父为空

	private Set    children = new HashSet(); //子菜单 
 
	
	private Integer postion;   //菜单位置
	
	private boolean status;        //1 启用，0 禁用 
	
	private boolean Open;			//是否开放　1是　0否
	
	private boolean BBS;        //1 是，0不是 
 
	private  Integer  topNum;  //栏目下显示条数
	
	protected Branch       branch;            //所属机构BBS
	 
	protected Department   dept;              //所属部门BBS

	/**
     * @struts.form-field form-name="ModuleMenuForm"
     * @hibernate.id column="menuId" generator-class="increment" unsaved-value="null"
     */
	
	public Long getMenuId() {
		
		return menuId;
	}	
	/**
     * @hibernate.many-to-one  cascade="none"
     *  column="branchId"  
     *  inverse="true"
     */
    
    public Branch getBranch() {
		return branch;
	}
    
    /**
     * @hibernate.many-to-one  cascade="none"
     *  column="deptId"  
     *  inverse="true"
     *  lazy="false"
     */
	public Department getDept() {
		return dept;
	}
/**
 * @hibernate.property
 * @return
 */
    public Long getDeep() {
		return deep;
	}


		/**
		 * @struts.form-field form-name="ModuleMenuForm"
	     * @hibernate.property column="postion"
	     */

		public Integer getPostion() {
			return postion;
		}
		/**
		 * @struts.form-field form-name="ModuleMenuForm"
	     * @hibernate.property column="status" type="yes_no"
	     */
		public boolean isStatus() {
			return status;
		}
		/**
		 * @struts.form-field form-name="ModuleMenuForm"
		 * @hibernate.property column="open" type="yes_no"
		 * @return
		 */
		public boolean isOpen() {
			return Open;
		}
		/**
		 * @struts.form-field form-name="ModuleMenuForm"
		 * @hibernate.property column="BBS" type="yes_no"
		 * @return
		 */
		public boolean isBBS() {
			return BBS;
		}
		/**
		  * 
		  * @struts.form-field form-name="ModuleMenuForm"
		  * @hibernate.property column="topNum"
	      */

		public Integer getTopNum() {
			return topNum;
		}
 
 
	/**
     * @struts.form-field form-name="ModuleMenuForm"
     * @struts.validator type="required"
     * @hibernate.property column="menuName" not-null="true" length="50" unique="true"
     */
	public String getMenuName() {
		return menuName;
	}
	 /**
     * @struts.form-field form-name="ModuleMenuForm"
     * @hibernate.property column="url" length="200"
     */
	public String getUrl() {
		return url;
	}

	 /**
     * @struts.form-field form-name="ModuleMenuForm"
     * @hibernate.property column="target" length="50"
     */
	public String getTarget() {
		return target;
	}
	 /**
     * @struts.form-field form-name="ModuleMenuForm"
     * @hibernate.property column="title" length="50"
     */

	public String getTitle() {
		return title;
	}

   
	/**
	 * 
	 * @hibernate.many-to-one 
	 *   name="parent"
	 *   column="parentId"
	 *   not-null="false"
	 *   class="com.carsite.model.ModuleMenu"
	 */
	public ModuleMenu getParent() {
		return parent;
	}
	
	
	/**
	 * @hibernate.set	name="chindren" cascade="delete-orphan" inverse="true" lazy="false"
	 * @hibernate.one-to-many	 class="com.carsite.model.ModuleMenu"
	 * @hibernate.collection-key column="parentId"
	 * 
	 */
	public Set getChildren() {
		return children;
	}
	



	public void setChildren(Set children) {
		this.children = children;
	}

	public void setMenuId(Long menuId) {
		this.menuId = menuId;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public void setParent(ModuleMenu parent) {
		this.parent = parent;
	}

	 
	public void setTarget(String target) {
		this.target = target;
	}


	public void setBranch(Branch branch) {
		this.branch = branch;
	}
	public void setDept(Department dept) {
		this.dept = dept;
	}
	public void setPostion(Integer postion) {
		this.postion = postion;
	}
	
	public void setBBS(boolean bbs) {
		BBS = bbs;
	}
	public void setOpen(boolean open) {
		Open = open;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}
	public void setTopNum(Integer topNum) {
		this.topNum = topNum;
	}
	 
	
	public void setDeep(Long deep) {
		this.deep = deep;
	}
	public void setTitle(String title) {
		this.title = title;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	
	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int hashCode() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}
	
	
	

	
	 

	

}
